/**
 * Created by red on 2017/5/11.
 */
import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);

import { Home, Content } from 'layout/';
import { Login } from 'views/';
import home from './home';
import book from './book';
import chapter from './chapter';
import question from './question';
import answer from './answer';


export default new Router({
	routes: [
		{
			path: '/',
			name: 'Hello',
			hidden: true,
			redirect(to) {
				return 'login';
			}
		}, {
			path: '/login',
			name: '登录',
			hidden: true,
			component: Login
		}, {
			path: '/main',
			name: '平台',
			icon: 'inbox',
			component: Home,
			redirect: '/home',
			children: [home, book, chapter, question, answer]
		},
	]
})